<?php
class AddtypeAction extends BaseAction{
    public function index(){       
        $this->display();
    }
    public function addtype(){
        $result=M('newstypes')->add($_POST);
        if($result>0){
            $this->success('添加成功',__APP__."/Addtype/index.html");
        }else{
            $this->success('添加失败',__APP__."/Addtype/index.html");
        }
    }
}